{{-- 模板名字 --}} 
@extends('Layout/HomeBase') 



{{-- 页面名字 --}} 




{{-- 加载css文件 --}} 
@section('css')

<link href="{{asset('Home/css/hmstyle.css')}}" rel="stylesheet" type="text/css" />
<style type="text/css">
    .clock {
        display: block;
        height: 145px;
        background:url("{{asset('Home/images')}}/clockbg.png") repeat;
        position: relative;
    }
</style>
@endsection 





{{-- 网页主体 --}}
@section('main')

<div class="banner">

    <!--轮播 -->
    <div class="am-slider am-slider-default scoll" data-am-flexslider id="demo-slider-0">
        <ul class="am-slides">
            <li class="banner1">
                <a href="javascript:;"><img src="{{$pic1}}"  /></a>
            </li>
            <li class="banner2">
                <a href="javascript:;"><img src="{{$pic2}}" /></a>
            </li>
            <li class="banner3">
                <a href="javascript:;"><img src="{{$pic3}}" /></a>
            </li>
            <li class="banner4">
                <a href="javascript:;"><img src="{{$pic4}}" /></a>
            </li>
        </ul>
    </div>
    <div class="clear"></div>

</div>




 <div class="shopNav" >
    <div class="slideall">
        <div class="long-title"><span class="all-goods">全部分类</span></div>
        <div class="nav-cont">
            <ul>
                <li class="index">
                    <a href="/">首页</a>
                </li>
                <li class="qc">
                    <a href="javascript:;">闪购</a>
                </li>
                <li class="qc">
                    <a href="javascript:;">限时抢</a>
                </li>
                <li class="qc">
                    <a href="javascript:;">团购</a>
                </li>
                <li class="qc last">
                    <a href="javascript:;">大包装</a>
                </li>
            </ul>
        </div>

        <!--侧边导航 -->
        <div id="nav" class="navfull"  style="display: none;">
            <div class="area clearfix" style="z-index:500;">
                <div class="category-content" id="guide_2" >

                    <div class="category" >
                        <ul class="category-list" id="js_climit_li">


                            <!-- 导航栏遍历 -->
                            @foreach ($type as $k => $v)
                            <li class="appliance js_toggle relative first">
                                <div class="category-info">
                                    <h3 class="category-name b-category-name"><i><!-- <img src="{{asset('Home/images/cake.png')}}"> --></i><a class="ml-22" title="点心">{{ $k }}</a></h3>
                                    <em>&gt;</em></div>
                                
                                <div class="menu-item menu-in top">
                                    <div class="area-in">
                                        <div class="area-bg">
                                            <div class="menu-srot">
                                                <div class="sort-side">
                                                    @foreach ($v as $cc => $aa) 
                                                    <dl class="dl-sort">
                                                        <dt><span title="{{$cc}}">{{$cc}}</span></dt>
                                                        <dd>
                                                            @foreach ($aa as $sb => $db)
                                                            <a title="{{$db}}" href="/type/{{ $sb }}"><span>{{$db}}</span></a>
                                                            @endforeach
                                                        </dd>
                                                    </dl>
                                                    @endforeach
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                
                                <b class="arrow"></b>
                            </li>
                            @endforeach
                            <!-- 导航栏 -->
                        </ul>
                    </div>
                </div>
            </div>
        </div>  

        
</div>
</div>

<div class="shopMainbg">
    <div class="shopMain" id="shopmain" style="min-width:1304px;">

        <!--今日推荐 -->

        <div class="am-g am-g-fixed recommendation">
            <div class="clock am-u-sm-3 ">
                <img src="{{asset('Home/images/2017.png')}} "></img>
                <p>今日<br>推荐</p>
            </div>
            <div class="am-u-sm-4 am-u-lg-3 ">
                <div class="info ">
                    <h3>真的有鱼</h3>
                    <h4>开年福利篇</h4>
                </div>
                <div class="recommendationMain ">
                    <img src="{{asset('Home/images/ooop.jpg')}} " style='height:120px;'></img>
                </div>
            </div>
            <div class="am-u-sm-4 am-u-lg-3 ">
                <div class="info ">
                    <h3>囤货过冬</h3>
                    <h4>让爱早回家</h4>
                </div>
                <div class="recommendationMain ">
                    <img src="{{asset('Home/images/qwqe.jpg')}} "style='height:120px;'></img>
                </div>
            </div>
            <div class="am-u-sm-4 am-u-lg-3 ">
                <div class="info ">
                    <h3>浪漫情人节</h3>
                    <h4>甜甜蜜蜜</h4>
                </div>
                <div class="recommendationMain ">
                    <img src="{{asset('Home/images/lkkk.jpg')}} "style='height:120px;'></img>
                </div>
            </div>

        </div>
        <div class="clear "></div>

       <!--  <div class="am-container ">
            <div class="shopTitle ">
                <h4>甜品</h4>
                <h3>每一道甜品都有一个故事</h3>
                <div class="today-brands ">
                    <a href="javascript:; ">桂花糕</a>
                    <a href="javascript:; ">奶皮酥</a>
                    <a href="javascript:; ">栗子糕 </a>
                    <a href="javascript:; ">马卡龙</a>
                    <a href="javascript:; ">铜锣烧</a>
                    <a href="javascript:; ">豌豆黄</a>
                </div>
                <span class="more "><a class="more-link " href="javascript:; ">更多美味</a> </span>
            </div>
        </div>
       <div class="am-g am-g-fixed floodOne ">
                        <div class="am-u-sm-5 am-u-md-3 am-u-lg-4 text-one ">
                            <a href="/detail/{{$hot_goods[0]->id}} ">
                                <div class="outer-con ">
                                    <div class="title ">
                                        {{$hot_goods[0]->gname}}
                                    </div>                  
                                    <div class="sub-title ">
                                         {{$hot_goods[0]->gname}}
                                    </div>
                                </div>
                                  <img src=" {{$hot_goods[0]->pic}} " style="width:320px;height:320px;"/>                             
                            </a>
                        </div>
                        <div class="am-u-sm-7 am-u-md-5 am-u-lg-4">
                            <div class="text-two">
                                <div class="outer-con ">
                                    <div class="title ">
                                         {{$hot_goods[1]->gname}}
                                    </div>                                  
                                    <div class="sub-title ">
                                        仅售：¥ {{$hot_goods[1]->gname}}
                                    </div>
                                    
                                </div>
                                <a href="/detail/{{$hot_goods[1]->id}} "><img src=" {{$hot_goods[1]->pic}} " style="width:200px;height:200px;"/></a>
                            </div>
                            <div class="text-two last">
                                <div class="outer-con ">
                                    <div class="title ">
                                         {{$hot_goods[2]->gname}}
                                    </div>
                                    <div class="sub-title ">
                                        仅售：¥13.8
                                    </div>
                                    
                                </div>
                                <a href="/detail/{{$hot_goods[2]->id}} "><img src=" {{$hot_goods[2]->pic}} " style="width:200px;height:200px;"/></a>
                            </div>
                        </div>
                     <div class="am-u-sm-12 am-u-md-4 ">
                        <div class="am-u-sm-3 am-u-md-6 text-three">
                            <div class="outer-con ">
                                <div class="title ">
                                    {{$hot_goods[3]->gname}}
                                </div>
                                
                                <div class="sub-title ">
                                     {{$hot_goods[3]->gname}}
                                </div>
                            </div>
                            <a href="/detail/{{$hot_goods[3]->id}}"><img src=" {{$hot_goods[3]->pic}} " style="width:140px;height:140px;"/></a>
                        </div>

                        <div class="am-u-sm-3 am-u-md-6 text-three">
                            <div class="outer-con ">
                                <div class="title ">
                                   {{$hot_goods[4]->gname}}
                                </div>
                                
                                <div class="sub-title ">
                                    尝鲜价：¥4.8
                                </div>

                            </div>
                            <a href="/detail/{{$hot_goods[4]->id}} "><img src=" {{$hot_goods[4]->pic}}" style="width:140px;height:140px;"/></a>
                        </div>

                        <div class="am-u-sm-3 am-u-md-6 text-three">
                            <div class="outer-con ">
                                <div class="title ">
                                    {{$hot_goods[5]->gname}}
                                </div>
                                
                                <div class="sub-title ">
                                    尝鲜价：¥4.8
                                </div>
                            </div>
                            <a href="/detail/{{$hot_goods[5]->id}}"><img src=" {{$hot_goods[5]->pic}}" style="width:140px;height:140px;"/></a>
                        </div>

                        <div class="am-u-sm-3 am-u-md-6 text-three last ">
                            <div class="outer-con ">
                                <div class="title ">
                                     {{$hot_goods[6]->gname}}
                                </div>
                                
                                <div class="sub-title ">
                                    尝鲜价：¥4.8
                                </div>
                            </div>
                            <a href="/detail/{{$hot_goods[6]->id}} "><img src=" {{$hot_goods[6]->pic}} " style="width:140px;height:140px;"/></a>
                        </div>
                    </div>

                    </div>
                 <div class="clear "></div>
 -->


        <!--坚果-->
        <div class="am-container ">
            <div class="shopTitle ">
                <h4>热销商品</h4>
                <!-- <h3>酥酥脆脆，回味无穷</h3> -->
                <div class="today-brands ">
                   <a href="javascript:; ">手机</a>
                    <a href="javascript:; ">电脑</a>
                     <a href="javascript:; ">手机</a>
                    <a href="javascript:; ">电脑</a>
                     <a href="javascript:; ">手机</a>
                    <a href="javascript:; ">电脑</a>
                </div>
                <span class="more ">
                            <a class="more-link " href="javascript:; ">更多美味</a>
                        </span>
            </div>
        </div>

        <div class="am-g am-g-fixed floodTwo ">
            @foreach($hot_goods as  $key => $goods)
                @if ($key == 0)
            <div class="am-u-sm-5 am-u-md-4 text-one ">
                <a href="/detail/{{ $goods->id}} ">
                    <img src="{{$goods->pic}} " style="width:210px;height:210px;"/>
                    <div class="outer-con ">
                        <div class="title ">{{$goods->gname}}</div>
                        <div class="sub-title ">仅售：¥{{$goods->price}}</div>
                    </div>
                </a>
            </div>
            @endif


    @if ($key == 1)
            <div class="am-u-sm-7 am-u-md-4 am-u-lg-2 text-two">
                <div class="outer-con ">
                    <div class="title ">
                        {{$goods->gname}}
                    </div>

                    <div class="sub-title ">
                        仅售：¥{{$goods->price}}
                    </div>
                </div>
                <a href="/detail/{{ $goods->id}}"><img src="{{$goods->pic}} " style="width:159px;height:159px;"/></a>
            </div>
            @endif

@if ($key == 2)
            <div class="am-u-md-4 am-u-lg-2 text-three">
                <div class="outer-con ">
                    <div class="title ">
                        {{$goods->gname}}
                    </div>

                    <div class="sub-title ">
                        尝鲜价：¥{{$goods->price}}
                    </div>
                </div>
                <a href="/detail/{{ $goods->id}} "><img src="{{$goods->pic}} " style="width:159px;height:159px;"/></a>
            </div>
            @endif
@if ($key == 3)
            <div class="am-u-md-4 am-u-lg-2 text-three">
                <div class="outer-con ">
                    <div class="title ">
                        {{$goods->gname}}
                    </div>

                    <div class="sub-title ">
                        尝鲜价：¥{{$goods->price}}
                    </div>
                </div>
                <a href="/detail/{{ $goods->id}} "><img src="{{$goods->pic}} " style="width:159px;height:159px;"/></a>
            </div>
            @endif
            @if ($key == 4)
            <div class="am-u-sm-6 am-u-md-4 am-u-lg-2 text-two ">
                <div class="outer-con ">
                    <div class="title ">
                        {{$goods->gname}}
                    </div>

                    <div class="sub-title ">
                        仅售：¥{{$goods->price}}
                    </div>
                </div>
                <a href="/detail/{{ $goods->id}} "><img src="{{$goods->pic}} " style="width:159px;height:159px;"/></a>
            </div>
            @endif

           @if ($key == 5)
            <div class="am-u-sm-6 am-u-md-3 am-u-lg-2 text-four ">
                <div class="outer-con ">
                    <div class="title ">{{$goods->gname}}</div>
                    <div class="sub-title ">仅售：¥{{$goods->price}}</div>
                </div>
                <a href="/detail/{{ $goods->id}} "><img src="{{$goods->pic}} " style="width:159px;height:159px;"/></a>
            </div>
            @endif
@if ($key == 6)
            <div class="am-u-sm-4 am-u-md-3 am-u-lg-4 text-five">
                <div class="outer-con ">
                    <div class="title ">
                        {{$goods->gname}}
                    </div>
                    <div class="sub-title ">
                        尝鲜价：¥{{$goods->price}}
                    </div>

                </div>
                <a href="/detail/{{ $goods->id}} "><img src="{{$goods->pic}} " style="width:210px;height:210px;"/></a>
            </div>
@endif
            @if ($key == 7)
            <div class="am-u-sm-4 am-u-md-3 am-u-lg-2 text-six">
                <div class="outer-con ">
                    <div class="title ">
                        {{$goods->gname}}
                    </div>

                    <div class="sub-title ">
                        尝鲜价：¥{{$goods->price}}
                    </div>
                </div>
                <a href="/detail/{{ $goods->id}} "><img src="{{$goods->pic}}" style="width:159px;height:159px;" /></a>
            </div>
@endif

            @if ($key == 8)
            <div class="am-u-sm-4 am-u-md-3 am-u-lg-4 text-five">
                <div class="outer-con ">
                    <div class="title ">{{$goods->gname}}</div>
                    <div class="sub-title ">尝鲜价：¥{{$goods->price}}</div>
                </div>
                <a href="/detail/{{ $goods->id}} "><img src="{{$goods->pic}} " style="width:210px;height:210px;"/></a>
            </div>
            @endif
            @endforeach
        </div>

        <div class="clear "></div>

        <div class="am-container ">
            <div class="shopTitle ">
                <h4>推荐</h4>
                <!-- <h3>你是我的优乐美么？不，我是你小鱼干</h3> -->
                <div class="today-brands ">
                    <a href="javascript:; ">手机</a>
                    <a href="javascript:; ">电脑</a>
                     <a href="javascript:; ">手机</a>
                    <a href="javascript:; ">电脑</a>
                </div>
                <span class="more ">
                            <a class="more-link " href="javascript:; ">更多美味</a>
                        </span>
            </div>
        </div>
        <div class="am-g am-g-fixed flood method3 ">
            <ul class="am-thumbnails ">
                @foreach($hot_goods as $shop) 
                    <li >
                        <div class="list " style="position:relative;">
                            <a href="/detail/{{ $shop->id}}"   id="shop">
                                <img src="{{ $shop->pic }} " style="width:188px;height:188px;"/>
                                <div class="pro-title ">原价￥{{ $shop->price}}</div>
                                <span class="e-price ">{{ $shop->gname}}</span>
                                <span style="color:#ccc; font-size: 5px;position:absolute;top: 2px;right: 3px;">已售:{{ $shop->goods_sales }}</span>
                            </a>
                        </div>
                    </li>
                @endforeach
            </ul>
        </div>

    </div>
</div>
</div>
<!-- </div> -->

@endsection



{{-- 页脚JS代码 --}}
@section('bottom-js')
<!--轮播 -->
<script type="text/javascript">
    (function() {
        $('.am-slider').flexslider();
    });
    $(document).ready(function() {
        $("li").hover(function() {
            $(".category-content .category-list li.first .menu-in").css("display", "none");
            $(".category-content .category-list li.first").removeClass("hover");
            $(this).addClass("hover");
            $(this).children("div.menu-in").css("display", "block")
        }, function() {
            $(this).removeClass("hover")
            $(this).children("div.menu-in").css("display", "none")
        });
    })
</script>
<script type="text/javascript">
    if($(window).width() < 640) {
        function autoScroll(obj) {
            $(obj).find("ul").animate({
                marginTop: "-39px"
            }, 500, function() {
                $(this).css({
                    marginTop: "0px"
                }).find("li:first").appendTo(this);
            })
        }
        $(function() {
            setInterval('autoScroll(".demo")', 3000);
        })
    }
</script>
@endsection




